#include <bits/stdc++.h>
using namespace std;

int w[2500],f[2500],g[2500];
int n,m;


int main(){
    cin >> n >> m;
    for(int i = 1;i <= n;i++) cin >> w[i];
    f[0] = 1;
    for(int i = 1;i <= n;i++)
        for(int j = m;j >= w[i];j--)
            f[j] = (f[j] + f[j-w[i]]) % 10;
    for(int i = 1;i <= n;i++){
        g[0] = 1;
        for(int k = 1;k <= m;k++){
            if(w[i]>k) g[k] = f[k] % 10;
            else g[k] = (f[k]-g[k-w[i]]+10)%10;
            cout << g[k];
        }
        cout<<endl;
    }
    return 0;   
}

